package com.swsc.solarverse.common.enums;

/**
 * @Author chencl
 * @Date 2022/7/5 16:21
 * @Version 1.0
 * @Description DefectStateEnums
 */
@lombok.Getter
@lombok.AllArgsConstructor
public enum DefectStateEnums {
    DEAL("1", "已消缺"),
    UNDEAL("0", "未消缺"),
    ;

    private String state;
    private String name;


    public static String getName(String state) {
        for(DefectStateEnums enums : DefectStateEnums.values()){
            if(enums.state.equals(state)){
                return enums.name;
            }
        }
        return null;
    }
}
